{% extends 'website/base.html' %}
{% load static %}

{% block title %}CCRadio - Artist: {{ artist.name }}{% endblock %}

{% block page %}
    <div id="artist_body">
        <h1>{{ artist.name }}
            {% if member %}
                <a href={% url 'artist_update' artist_handle=artist.handle %}>
                    <img src={% static 'website/user_group_edit.png' %} height=32 width=32>
                </a>
                <a href={% url 'album_create' artist_handle=artist.handle %}>
                    <img src = {% static 'website/album_new.png' %} height=32 width=32>
                </a>
            {% endif %}
        </h1>
        <br>
        {% if artist.bio %}
            <h3>{{ artist.bio }}</h3>
            <br>
        {% endif %}
        <h2>Albums</h2>
        {% if albums %}
            <ul>
                {% for album in albums %}
                    <li><a href={% url 'album' artist_handle=artist.handle album_slug=album.slug %}>{{ album.title }}</a></li>
                {% endfor %}
            </ul>
        {% else %}
            <h4>No albums for this artist yet!</h4>
        {% endif %}
    </div>
{% endblock %}
